Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

settings page updates #11

Merged
merged 12 commits into from
Aug 26, 2024
Merged

settings page updates #11

merged 12 commits into from
Aug 26, 2024

Conversation

shekharnwagh
Copy link
Contributor

@shekharnwagh shekharnwagh commented Aug 23, 2024

Description

The PR includes changes to the data storage model for Data Sources, particularly for Airtable integration, and User Interface improvements for the settings page.

Data Source Storage Model

A new unique field slug is added to the data sources. This field is user configurable as opposed to the uuid which is auto generated. This allows adding data sources in code and referencing them by the slug. Secrets for the data sources can be added in the settings page and can be linked to the data source by the slug.

The base and table fields are updated to store both the id and name for the Airtable base and table. This allows for displaying the name in the UI and using the id in the API calls. The updated storage model for Airtable is -

{
	"id": "rec1234567890",
	"slug": "test-airtable-source",
	"name": "Test Airtable Source",
	"type": "airtable",
	"base": {
		"id": "rec1234567890",
		"name": "Test Airtable Base"
	},
	"table": {
		"id": "rec1234567890",
		"name": "Test Airtable Table"
	}
}

Settings Page UI Improvements

  • Replaced the simple list view with a table view for the data sources with the slug, service, meta (to display data source specific information like base and table for Airtable and shop name for Shopify) and actions (add/edit/delete) columns.
  • Added spacing between the multiple buttons in the settings list view and form view (add/edit form).
  • Added a cancel button to the add/edit form, to allow going back to the list view without unnecessarily saving the form.
  • Added slug field to the add/edit form to allow adding data sources by slug.
  • Consistently use help attribute for input elements to show extra information for the input like errors, hints, additional data fetched remotely after validation input.
Screenshot 2024-08-26 at 4 37 32 PM
Data Sources List View
Screenshot 2024-08-26 at 4 37 50 PM
Data Sources Form View

@shekharnwagh shekharnwagh self-assigned this Aug 23, 2024
Every datasource configured from settings page has a unique UUID which
is autogenerated. Thus it isn't available before the datasource is
created and hence a user defined unique slug is need to associate
configured datasources with datasources in code.
@shekharnwagh shekharnwagh marked this pull request as ready for review August 26, 2024 11:12
@shekharnwagh shekharnwagh changed the title [WIP Do Not Merge] settings page updates settings page updates Aug 26, 2024
Copy link
Member

@jblz jblz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Just left a couple of spots where we need to update the translation calls.

src/data-sources/airtable/AirtableSettings.tsx Outdated Show resolved Hide resolved
src/data-sources/shopify/ShopifySettings.tsx Outdated Show resolved Hide resolved
Copy link
Member

@jblz jblz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@shekharnwagh shekharnwagh merged commit a5a4003 into trunk Aug 26, 2024
5 checks passed
@shekharnwagh shekharnwagh deleted the update/settings-page branch August 26, 2024 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants